YNQ  YNQ-1.5.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
CMResolverRegisteredMethodDescription Struct Reference

#include <cmapi.h>

Data Fields

NQ_INT activationPriority
 
NQ_UINT32 timeout
 
NQ_IPADDRESSserverIP
 
NQ_STATUS(* requestByName )(SYSocketHandle socket, const NQ_WCHAR *name, void *context, const NQ_IPADDRESS *serverIp, NQ_COUNT *numOfSentRequests)
 
NQ_STATUS(* responseByName )(SYSocketHandle socket, NQ_IPADDRESS **pAddressArray, NQ_INT *numIps, void **pContext)
 
NQ_STATUS(* requestByIp )(SYSocketHandle socket, const NQ_IPADDRESS *ip, void *context, const NQ_IPADDRESS *serverIp, NQ_COUNT *numOfSentRequests)
 
NQ_STATUS(* responseByIp )(SYSocketHandle socket, const NQ_WCHAR **pName, void **pContext)
 

Detailed Description

A descriptor of one resolver method. Use this structure to register a resolution method using the cmResolverRegisterExternalMethod()

Field Documentation

NQ_INT CMResolverRegisteredMethodDescription::activationPriority

This parameter may have one of the following values:

  1. Activate registered method before all other methods.
  2. Activate registered method after the existing NQ unicast methods and before existing NQ multicast methods. In this case registered method will be activated only if existing NQ unicast methods failed to resolve name or IP
  3. Activate registered method only if all other methods failed.
NQ_UINT32 CMResolverRegisteredMethodDescription::timeout

Timeout in seconds to use with this method

NQ_IPADDRESS* CMResolverRegisteredMethodDescription::serverIP

IP of the server to perform resolution with. This value is only used by Unicast methods.

NQ_STATUS(* CMResolverRegisteredMethodDescription::requestByName)(SYSocketHandle socket, const NQ_WCHAR *name, void *context, const NQ_IPADDRESS *serverIp, NQ_COUNT *numOfSentRequests)

Routine for composing and sending a name resolution request

Parameters
socket,:Socket handle to use for sending
name,:Name to resolve
context,:Pointer to a method-specific context. This value may be NULL on the first call.
serverIp,:Pointer to the IP of the server to query or NULL for multicast
numOfSentRequests,:Return the number of requests that were sent.
Returns
NQ_SUCCESS request sent NQ_ERR_<*> error
NQ_STATUS(* CMResolverRegisteredMethodDescription::responseByName)(SYSocketHandle socket, NQ_IPADDRESS **pAddressArray, NQ_INT *numIps, void **pContext)

Routine for receiving and parsing a name resolution response

Parameters
socketSocket handle to use for sending
pAddressArrayAddress of the pointer which this call sets to an array of resolved IP addresses. It is caller's responsibility to release this array. On error, this pointer remains untouched.
numIpsPointer to the number of resolved IPs.
pContextDouble pointer to a method-specific context. Method may dispose context and create a new one.
Returns
NQ_SUCCESS name successfully resolved NQ_ERR_MOREDATA more exchange expected NQ_ERR_NOACCESS more comprehensive method with the same code should be used NQ_ERR_<*> error
NQ_STATUS(* CMResolverRegisteredMethodDescription::requestByIp)(SYSocketHandle socket, const NQ_IPADDRESS *ip, void *context, const NQ_IPADDRESS *serverIp, NQ_COUNT *numOfSentRequests)

Routine for composing and sending an IP resolution request

Parameters
socketSocket handle to use for sending
ipPointer to the IP address to resolve.
contextPointer to a method-specific context. This value may be NULL on the first call.
serverIpPointer to the IP of the server to query or NULL for multicast
numOfSentRequestsReturn the number of requests that were sent.
Returns
NQ_SUCCESS request sent NQ_ERR_<*> error
NQ_STATUS(* CMResolverRegisteredMethodDescription::responseByIp)(SYSocketHandle socket, const NQ_WCHAR **pName, void **pContext)

Routine for receiving and parsing a name resolution response

Parameters
socketSocket handle to use for sending
pNameDouble pointer to the resolved name. On success, this variable will point to a newly allocated name. Its is caller's responsibility to release it later.
pContextDouble pointer to a method-specific context. Method may dispose context and create a new one.
Returns
NQ_SUCCESS name successfully resolved NQ_ERR_MOREDATA more exchange expected NQ_ERR_NOACCESS more comprehensive method with the same code should be used NQ_ERR_<*> error

The documentation for this struct was generated from the following file: